1 Setup

setwd("/mnt/picea/projects/arabidopsis/jhanson/arabidopsis-nutrition-TOR/Conditions")
suppressPackageStartupMessages({
    library(data.table)
    library(DESeq2)
    library(gplots)
    library(here)
    library(hyperSpec)
    library(limma)
    library(LSD)
    library(magrittr)
    library(matrixStats)
    library(parallel)
    library(pander)
    library(plotly)
    library(RColorBrewer)
    library(scatterplot3d)
    library(tidyverse)
    library(tximport)
    library(VennDiagram)
    library(vsn)
})
suppressPackageStartupMessages({
    source("~/Git/UPSCb/UPSCb-common/src/R/featureSelection.R")
    source("~/Git/UPSCb/UPSCb-common/src/R/gopher.R")
    source("~/Git/UPSCb/UPSCb-common/src/R/plot.multidensity.R")
    source("~/Git/UPSCb/UPSCb-common/src/R/volcanoPlot.R")
})
lfc <- 0.5
FDR <- 0.01
pal <- c(brewer.pal(8,"Dark2"),1)
pal2 <- brewer.pal(9,"Paired") #require package RColorBrewer
cols <- rainbow(17)
hpal <- colorRampPalette(c("blue","white","red"))(100)
mar <- par("mar")

2 Raw data

2.1 Loading of sample information

  • Read the sample information
samples <- read.csv("~/Git/UPSCb/projects/arabidopsis-nutrition-TOR/doc/samples3.csv")
  • Remove unnecessary samples
samples %<>% filter(!grepl("P11554_1",SciLifeID)) %>% 
    filter(! SciLifeID %in% c("P13406_101",
                        "P14066_128",
                        "P14066_133",
                        "P13406_102",
                        "P14066_131")) %>%
    filter(! Nutrition == "PKS") %>%
    mutate(Nutrition,Nutrition=relevel(Nutrition,"NPS")) %>% 
    mutate(AZD,AZD=relevel(AZD,"DMSO"))

samples <- samples[order(samples$Timepoint, samples$Nutrition, samples$AZD),]

samples %<>% mutate(Timepoint,Timepoint=factor(paste0("T",Timepoint)))

2.1.1 Load the data

  • Call the data
filenames <- list.files("../Salmon", 
                    recursive = TRUE, 
                    pattern = "quant.sf",
                    full.names = TRUE)
  • Name the data
names(filenames) <- sub("_S.*","",sapply(strsplit(filenames, "/"), .subset, 3))
  • Match data <=> sample list
filenames <- filenames[match(samples$SciLifeID,names(filenames))]
filenames <-filenames[!is.na(names(filenames))]
samples <- samples[match(names(filenames),samples$SciLifeID),]
  • Annotate the samples
samples$Conditions <- factor(paste(samples$Timepoint,
                                   samples$Nutrition,
                                   samples$AZD,sep="_"),
                             levels=c("T0_T0_0",
                                      "T6_NPS_DMSO", "T6_NPS_AZD", "T6_NS_DMSO", "T6_NS_AZD", "T6_NP_DMSO", "T6_NP_AZD",
                                      "T24_NPS_DMSO", "T24_NPS_AZD", "T24_NS_DMSO", "T24_NS_AZD", "T24_NP_DMSO", "T24_NP_AZD"))
samples$Batch <- factor(substr(samples$SciLifeID,1,8))
samples <- cbind(samples,
                 Id = gsub(".+-",
                           "",
                           samples$SampleName))
samples <- cbind(samples,
                 Tp_Id = factor(paste(samples$Timepoint,
                                      samples$Id,
                                      sep=".")))
write.csv(samples,"/mnt/picea/projects/arabidopsis/jhanson/arabidopsis-nutrition-TOR/analysis_Tom/samplelist.csv")

3 Expression data

Read the expression at the transcript level

tx <- suppressMessages(tximport(files = filenames, 
                                type = "salmon", 
                                txOut = TRUE))

summarise to genes

tx2gene <- data.frame(TXID=rownames(tx$counts),
                      GENEID=sub("\\.[0-9]+","",rownames(tx$counts)))
gx <- summarizeToGene(tx,tx2gene=tx2gene)
## summarizing abundance
## summarizing counts
## summarizing length
kg <- round(gx$counts) 

Sanity check

stopifnot(all(colnames(kg) == samples$SciLifeID))

3.1 Raw data export

#dir.create(file.path("analysis_Tom","salmon"),showWarnings=FALSE,recursive=TRUE)
#write.table(kg,file="/mnt/picea/projects/arabidopsis/jhanson/arabidopsis-nutrition-TOR/analysis_Tom/nutrition-unormalised-gene-expression_data.csv")
#save(kg, samples, file = "/mnt/picea/projects/arabidopsis/jhanson/arabidopsis-nutrition-TOR/analysis_Tom/counts.rda")

3.2 Preliminary validations

3.2.1 Check for the genes that are never expressed

sel <- rowSums(kg) == 0 
sprintf("%s%% (%s) of %s genes are not expressed",
        round(sum(sel) * 100/ nrow(kg),digits=1),
        sum(sel),
        nrow(kg))
## [1] "17.9% (5793) of 32310 genes are not expressed"

4 Data normalisation

For visualization, the data is submitted to a variance stabilization transformation using DESeq2. The dispersion is estimated independently of the sample type

dds <- DESeqDataSetFromMatrix(
    countData = kg,
    colData = samples,
    design = ~ Conditions)
## converting counts to integer mode
dds <- estimateSizeFactors(dds)

4.1 Perform a Variance Stabilizing Transformation for plotting

vst <- varianceStabilizingTransformation(dds,blind=FALSE)
vsd <- assay(vst)
vsd <- vsd - min(vsd)

Write out

stopifnot(all(colnames(vsd) == samples$SciLifeID))
colnames(vsd) <- samples$Tp_Id
write.csv(vsd,"/mnt/picea/projects/arabidopsis/jhanson/arabidopsis-nutrition-TOR/analysis_Tom/library-size-normalized_variance-stabilized_data_nutrition.csv")

5 Multivariate analysis

5.1 PCA

Principal Component Analysis on the normalized data * Establishment of the PCA

conditions1 <- factor(paste(samples$AZD,samples$Nutrition,sep="_"))
pc <- prcomp(t(vsd))
percent <- round(summary(pc)$importance[2,]*100);percent
##  PC1  PC2  PC3  PC4  PC5  PC6  PC7  PC8  PC9 PC10 PC11 PC12 PC13 PC14 PC15 PC16 
##   43   24   13    6    4    2    1    1    1    1    0    0    0    0    0    0 
## PC17 PC18 PC19 PC20 PC21 PC22 PC23 PC24 PC25 PC26 PC27 PC28 PC29 PC30 PC31 PC32 
##    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0 
## PC33 PC34 PC35 PC36 PC37 PC38 PC39 PC40 PC41 PC42 PC43 PC44 
##    0    0    0    0    0    0    0    0    0    0    0    0
  • Graphical representation of PC1 x PC2
conds <- droplevels(conditions1)
plot(pc$x[,1],
     pc$x[,2],
     xlab=paste("Comp. 1 (",percent[1],"%)",sep=""),
     ylab=paste("Comp. 2 (",percent[2],"%)",sep=""),
     col=pal[as.integer(conds)],
     pch=c(15,16,17)[as.factor(samples$Timepoint)],
     main="All timepoints")

legend("bottomright",pch=19,
       col=pal[1:nlevels(conds)],
       legend=levels(conds))

legend("topleft",pch=c(15,16,17),
       col="black",
       legend=c("T0","T6","T24"))

  • Graphical representation of PC2 x PC3
plot(pc$x[,2],
     pc$x[,3],
     xlab=paste("Comp. 2 (",percent[2],"%)",sep=""),
     ylab=paste("Comp. 3 (",percent[3],"%)",sep=""),
     col=pal[as.integer(conds)],
     pch=c(15,16,17)[as.factor(samples$Timepoint)],
     main="All timepoints")

legend("topleft",pch=19,
       col=pal[1:nlevels(conds)],
       legend=levels(conds))

legend("bottomleft",pch=c(15,16,17),
       col="black",
       legend=c("T0","T6","T24"))

  • Graphical representation of PC1 x PC3
plot(pc$x[,1],
     pc$x[,3],
     xlab=paste("Comp. 1 (",percent[1],"%)",sep=""),
     ylab=paste("Comp. 3 (",percent[3],"%)",sep=""),
     col=pal[as.integer(conds)],
     pch=c(15,16,17)[as.factor(samples$Timepoint)],
     main="All timepoints")

legend("bottomleft",pch=19,
       col=pal[1:nlevels(conds)],
       legend=levels(conds))

legend("bottomright",pch=c(15,16,17),
       col="black",
       legend=c("T0","T6","T24"))

6 Differential expression compared to T0

6.1 Filtration of samples based on timepoint

sel <- samples$Timepoint %in% c("T0","T6","T24")
suppressMessages(dds <- DESeqDataSetFromMatrix(
    countData = kg[,sel],
    colData = samples[sel,],
    design = ~ Conditions))

6.2 Differential expression analysis

dds <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 2 genes
## -- DESeq argument 'minReplicatesForReplace' = 7 
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing

6.3 Variance Stabilising Transformation

6.3.1 Perform a Variance Stabilizing Transformation for plotting

vst <- varianceStabilizingTransformation(dds,blind=FALSE)
vsd <- assay(vst)
vsd <- vsd - min(vsd)

The contrast by default is the first one (not Intercept)

resultsNames(dds)
##  [1] "Intercept"                          "Conditions_T6_NPS_DMSO_vs_T0_T0_0" 
##  [3] "Conditions_T6_NPS_AZD_vs_T0_T0_0"   "Conditions_T6_NS_DMSO_vs_T0_T0_0"  
##  [5] "Conditions_T6_NS_AZD_vs_T0_T0_0"    "Conditions_T6_NP_DMSO_vs_T0_T0_0"  
##  [7] "Conditions_T6_NP_AZD_vs_T0_T0_0"    "Conditions_T24_NPS_DMSO_vs_T0_T0_0"
##  [9] "Conditions_T24_NPS_AZD_vs_T0_T0_0"  "Conditions_T24_NS_DMSO_vs_T0_T0_0" 
## [11] "Conditions_T24_NS_AZD_vs_T0_T0_0"   "Conditions_T24_NP_DMSO_vs_T0_T0_0" 
## [13] "Conditions_T24_NP_AZD_vs_T0_T0_0"

6.3.2 Effect of 6 hrs of treatment

res <- results(dds,name = "Conditions_T6_NPS_DMSO_vs_T0_T0_0")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T6_NPS_DMSO_vs_T0_T0_0.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 9664 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 5302 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 4362 genes that are repressed
res <- results(dds,name = "Conditions_T6_NPS_AZD_vs_T0_T0_0")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T6_NPS_AZD_vs_T0_T0_0.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 8735 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 4639 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 4096 genes that are repressed
res <- results(dds,name = "Conditions_T6_NS_DMSO_vs_T0_T0_0")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T6_NS_DMSO_vs_T0_T0_0.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 6589 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 3553 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 3036 genes that are repressed
res <- results(dds,name = "Conditions_T6_NS_AZD_vs_T0_T0_0")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T6_NS_AZD_vs_T0_T0_0.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 9218 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 4775 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 4443 genes that are repressed
res <- results(dds,name = "Conditions_T6_NP_DMSO_vs_T0_T0_0")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T6_NP_DMSO_vs_T0_T0_0.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 9491 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 5053 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 4438 genes that are repressed
res <- results(dds,name = "Conditions_T6_NP_AZD_vs_T0_T0_0")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T6_NP_AZD_vs_T0_T0_0.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 7818 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 4332 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 3486 genes that are repressed

6.3.3 Effect of 24 hrs of treatment

res <- results(dds,name = "Conditions_T24_NPS_DMSO_vs_T0_T0_0")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T24_NPS_DMSO_vs_T0_T0_0.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 10531 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 5150 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 5381 genes that are repressed
res <- results(dds,name = "Conditions_T24_NPS_AZD_vs_T0_T0_0")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T24_NPS_AZD_vs_T0_T0_0.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 8349 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 4066 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 4283 genes that are repressed
res <- results(dds,name = "Conditions_T24_NS_DMSO_vs_T0_T0_0")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T24_NS_DMSO_vs_T0_T0_0.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 4579 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 2165 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 2414 genes that are repressed
res <- results(dds,name = "Conditions_T24_NS_AZD_vs_T0_T0_0")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T24_NS_AZD_vs_T0_T0_0.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 7102 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 3258 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 3844 genes that are repressed
res <- results(dds,name = "Conditions_T24_NP_DMSO_vs_T0_T0_0")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T24_NP_DMSO_vs_T0_T0_0.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 9502 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 4685 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 4817 genes that are repressed
res <- results(dds,name = "Conditions_T24_NP_AZD_vs_T0_T0_0")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T24_NP_AZD_vs_T0_T0_0.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 8906 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 4614 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 4292 genes that are repressed

7 Differential expression based on the nutrition and treatment at T6

7.1 Filtration of samples based on timepoint

samples %<>% mutate(Conditions,Conditions=relevel(Conditions,"T6_NPS_DMSO"))
sel <- samples$Timepoint %in% c("T6")
suppressMessages(dds <- DESeqDataSetFromMatrix(
    countData = kg[,sel],
    colData = samples[sel,],
    design = ~ Conditions))

7.2 Differential expression analysis

dds <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing

7.3 Variance Stabilising Transformation

7.3.1 Perform a Variance Stabilizing Transformation for plotting

vst <- varianceStabilizingTransformation(dds,blind=FALSE)
vsd <- assay(vst)
vsd <- vsd - min(vsd)

7.4 Contrasts to NPS_DMSO

The contrast by default is the first one (not Intercept)

resultsNames(dds)
## [1] "Intercept"                           
## [2] "Conditions_T6_NPS_AZD_vs_T6_NPS_DMSO"
## [3] "Conditions_T6_NS_DMSO_vs_T6_NPS_DMSO"
## [4] "Conditions_T6_NS_AZD_vs_T6_NPS_DMSO" 
## [5] "Conditions_T6_NP_DMSO_vs_T6_NPS_DMSO"
## [6] "Conditions_T6_NP_AZD_vs_T6_NPS_DMSO"

7.4.1 Nutrition effect of carbon starvation

7.4.1.1 Extraction of the results from the DESeq analysis

res <- results(dds,name = "Conditions_T6_NP_DMSO_vs_T6_NPS_DMSO")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T6_NP_DMSO_vs_T6_NPS_DMSO.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR
SucEffect6hrs <- rownames(res[cutoffs,])
SucLow6hrs <- rownames(res[cutoff2,])
SucHigh6hrs <- rownames(res[cutoff1,])

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 1693 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 709 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 984 genes that are repressed

7.4.1.2 MA plot

DESeq2::plotMA(res)

7.4.1.3 Volcano plot

volcanoPlot(res, lfc = 1)

7.4.1.4 Heatmap

hm <- heatmap.2(t(scale(t(vsd[cutoffs,]))),col=hpal,
                Colv=FALSE,dendrogram = "row",trace = "none",labRow = FALSE,
                distfun = pearson.dist, labCol = paste(samples$Nutrition,samples$AZD,sep="-")[sel],
                hclustfun = function(X){hclust(X,method="ward.D2")},margins = c(6,5))

7.4.2 Nutrition effect of phosphorus starvation

7.4.2.1 Extraction of the results from the DESeq analysis

res <- results(dds,name = "Conditions_T6_NS_DMSO_vs_T6_NPS_DMSO")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T6_NS_DMSO_vs_T6_NPS_DMSO.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR
PiEffect6hrs <- rownames(res[cutoffs,])
PiLow6hrs <- rownames(res[cutoff2,])
PiHigh6hrs <- rownames(res[cutoff1,])

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 6994 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 3173 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 3821 genes that are repressed

7.4.2.2 MA plot

DESeq2::plotMA(res)

7.4.2.3 Volcano plot

volcanoPlot(res, lfc=1)

7.4.2.4 Heatmap

hm <- heatmap.2(t(scale(t(vsd[cutoffs,]))),col=hpal,
                Colv=FALSE,dendrogram = "row",trace = "none",labRow = FALSE,
                distfun = pearson.dist, labCol = paste(samples$Nutrition,samples$AZD,sep="-")[sel],
                hclustfun = function(X){hclust(X,method="ward.D2")},margins = c(6,5))

7.4.3 Effect of AZD-8055

7.4.3.1 Extraction of the results from the DESeq analysis

res <- results(dds,name = "Conditions_T6_NPS_AZD_vs_T6_NPS_DMSO")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T6_NPS_AZD_vs_T6_NPS_DMSO.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR
AzdEffect6hrs <- rownames(res[cutoffs,])
AzdLow6hrs <- rownames(res[cutoff2,])
AzdHigh6hrs <- rownames(res[cutoff1,])

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 6470 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 2866 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 3604 genes that are repressed

7.4.3.2 MA plot

DESeq2::plotMA(res)

7.4.3.3 Volcano plot

volcanoPlot(res, lfc=1)

7.4.3.4 Heatmap

hm <- heatmap.2(t(scale(t(vsd[cutoffs,]))),col=hpal,
                Colv=FALSE,dendrogram = "row",trace = "none",labRow = FALSE,
                distfun = pearson.dist, labCol = paste(samples$Nutrition,samples$AZD,sep="-")[sel],
                hclustfun = function(X){hclust(X,method="ward.D2")},margins = c(6,5))

7.4.4 Combined effect of AZD treatment and sugar starvation

7.4.4.1 Extraction of the results from the DESeq analysis

res <- results(dds,name = "Conditions_T6_NP_AZD_vs_T6_NPS_DMSO")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T6_NP_AZD_vs_T6_NPS_DMSO.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR
AzdNP6hrs <- rownames(res[cutoffs,])
AzdNPLow6hrs <- rownames(res[cutoff2,])
AzdNPHigh6hrs <- rownames(res[cutoff1,])

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 6434 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 2939 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 3495 genes that are repressed

7.4.4.2 MA plot

DESeq2::plotMA(res)

7.4.4.3 Volcano plot

volcanoPlot(res, lfc=1)

7.4.4.4 Heatmap

hm <- heatmap.2(t(scale(t(vsd[cutoffs,]))),col=hpal,
                Colv=FALSE,dendrogram = "row",trace = "none",labRow = FALSE,
                distfun = pearson.dist, labCol = paste(samples$Nutrition,samples$AZD,sep="-")[sel],
                hclustfun = function(X){hclust(X,method="ward.D2")},margins = c(6,5))

7.4.5 Combined effect of AZD treatment and phosphorus starvation

7.4.5.1 Extraction of the results from the DESeq analysis

res <- results(dds,name = "Conditions_T6_NS_AZD_vs_T6_NPS_DMSO")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T6_NS_AZD_vs_T6_NPS_DMSO.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR
AzdNS6hrs <- rownames(res[cutoffs,])
AzdNSLow6hrs <- rownames(res[cutoff2,])
AzdNSHigh6hrs <- rownames(res[cutoff1,])

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 9390 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 4556 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 4834 genes that are repressed

7.4.5.2 MA plot

DESeq2::plotMA(res)

7.4.5.3 Volcano plot

volcanoPlot(res, lfc=1)

7.4.5.4 Heatmap

hm <- heatmap.2(t(scale(t(vsd[cutoffs,]))),col=hpal,
                Colv=FALSE,dendrogram = "row",trace = "none",labRow = FALSE,
                distfun = pearson.dist, labCol = paste(samples$Nutrition,samples$AZD,sep="-")[sel],
                hclustfun = function(X){hclust(X,method="ward.D2")},margins = c(6,5))

8 Differential expression based on the nutrition and treatment at T24

8.1 Filtration of samples based on timepoint

samples %<>% mutate(Conditions,Conditions=relevel(Conditions,"T24_NPS_DMSO"))
sel <- samples$Timepoint %in% c("T24")
suppressMessages(dds <- DESeqDataSetFromMatrix(
    countData = kg[,sel],
    colData = samples[sel,],
    design = ~ Conditions))

8.2 Differential expression analysis

dds <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing

8.3 Variance Stabilising Transformation

8.3.1 Perform a Variance Stabilizing Transformation for plotting

vst <- varianceStabilizingTransformation(dds,blind=FALSE)
vsd <- assay(vst)
vsd <- vsd - min(vsd)

8.4 Contrasts to NPS_DMSO

The contrast by default is the first one (not Intercept)

resultsNames(dds)
## [1] "Intercept"                             
## [2] "Conditions_T24_NPS_AZD_vs_T24_NPS_DMSO"
## [3] "Conditions_T24_NS_DMSO_vs_T24_NPS_DMSO"
## [4] "Conditions_T24_NS_AZD_vs_T24_NPS_DMSO" 
## [5] "Conditions_T24_NP_DMSO_vs_T24_NPS_DMSO"
## [6] "Conditions_T24_NP_AZD_vs_T24_NPS_DMSO"

8.4.1 Nutrition effect of carbon starvation

8.4.1.1 Extraction of the results from the DESeq analysis

res <- results(dds,name = "Conditions_T24_NP_DMSO_vs_T24_NPS_DMSO")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T24_NP_DMSO_vs_T24_NPS_DMSO.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR
SucEffect24hrs <- rownames(res[cutoffs,])
SucLow24hrs <- rownames(res[cutoff2,])
SucHigh24hrs <- rownames(res[cutoff1,])

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 2286 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 1190 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 1096 genes that are repressed

8.4.1.2 MA plot

DESeq2::plotMA(res)

8.4.1.3 Volcano plot

volcanoPlot(res, lfc=1)

8.4.1.4 Heatmap

hm <- heatmap.2(t(scale(t(vsd[cutoffs,]))),col=hpal,
                Colv=FALSE,dendrogram = "row",trace = "none",labRow = FALSE,
                distfun = pearson.dist, labCol = paste(samples$Nutrition,samples$AZD,sep="-")[sel],
                hclustfun = function(X){hclust(X,method="ward.D2")},margins = c(6,5))

8.4.2 Nutrition effect of phosphorus starvation

8.4.2.1 Extraction of the results from the DESeq analysis

res <- results(dds,name = "Conditions_T24_NS_DMSO_vs_T24_NPS_DMSO")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T24_NS_DMSO_vs_T24_NPS_DMSO.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR
PiEffect24hrs <- rownames(res[cutoffs,])
PiLow24hrs <- rownames(res[cutoff2,])
PiHigh24hrs <- rownames(res[cutoff1,])

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 7958 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 4057 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 3901 genes that are repressed

8.4.2.2 MA plot

DESeq2::plotMA(res)

8.4.2.3 Volcano plot

volcanoPlot(res, lfc = 1)

8.4.2.4 Heatmap

hm <- heatmap.2(t(scale(t(vsd[cutoffs,]))),col=hpal,
                Colv=FALSE,dendrogram = "row",trace = "none",labRow = FALSE,
                distfun = pearson.dist, labCol = paste(samples$Nutrition,samples$AZD,sep="-")[sel],
                hclustfun = function(X){hclust(X,method="ward.D2")},margins = c(6,5))

8.4.3 Effect of AZD-8055

8.4.3.1 Extraction of the results from the DESeq analysis

res <- results(dds,name = "Conditions_T24_NPS_AZD_vs_T24_NPS_DMSO")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T24_NPS_AZD_vs_T24_NPS_DMSO.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR
AzdEffect24hrs <- rownames(res[cutoffs,])
AzdLow24hrs <- rownames(res[cutoff2,])
AzdHigh24hrs <- rownames(res[cutoff1,])

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 9852 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 4857 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 4995 genes that are repressed

8.4.3.2 MA plot

DESeq2::plotMA(res)

8.4.3.3 Volcano plot

volcanoPlot(res, lfc=1)

8.4.3.4 Heatmap

hm <- heatmap.2(t(scale(t(vsd[cutoffs,]))),col=hpal,
                Colv=FALSE,dendrogram = "row",trace = "none",labRow = FALSE,
                distfun = pearson.dist, labCol = paste(samples$Nutrition,samples$AZD,sep="-")[sel],
                hclustfun = function(X){hclust(X,method="ward.D2")},margins = c(6,5))

8.4.4 Combined effect of AZD treatment and sugar starvation

8.4.4.1 Extraction of the results from the DESeq analysis

res <- results(dds,name = "Conditions_T24_NP_AZD_vs_T24_NPS_DMSO")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T24_NP_AZD_vs_T24_NPS_DMSO.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR
AzdNP24hrs <- rownames(res[cutoffs,])
AzdNPLow24hrs <- rownames(res[cutoff2,])
AzdNPHigh24hrs <- rownames(res[cutoff1,])

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 11535 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 5956 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 5579 genes that are repressed

8.4.4.2 MA plot

DESeq2::plotMA(res)

8.4.4.3 Volcano plot

volcanoPlot(res, lfc=1)

8.4.4.4 Heatmap

hm <- heatmap.2(t(scale(t(vsd[cutoffs,]))),col=hpal,
                Colv=FALSE,dendrogram = "row",trace = "none",labRow = FALSE,
                distfun = pearson.dist, labCol = paste(samples$Nutrition,samples$AZD,sep="-")[sel],
                hclustfun = function(X){hclust(X,method="ward.D2")},margins = c(6,5))

8.4.5 Combined effect of AZD treatment and phosphorus starvation

8.4.5.1 Extraction of the results from the DESeq analysis

res <- results(dds,name = "Conditions_T24_NS_AZD_vs_T24_NPS_DMSO")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T24_NS_AZD_vs_T24_NPS_DMSO.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR
AzdNS24hrs <- rownames(res[cutoffs,])
AzdNSLow24hrs <- rownames(res[cutoff2,])
AzdNSHigh24hrs <- rownames(res[cutoff1,])

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 10805 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 5446 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 5359 genes that are repressed

8.4.5.2 MA plot

DESeq2::plotMA(res)

8.4.5.3 Volcano plot

volcanoPlot(res, lfc=1)

8.4.5.4 Heatmap

hm <- heatmap.2(t(scale(t(vsd[cutoffs,]))),col=hpal,
                Colv=FALSE,dendrogram = "row",trace = "none",labRow = FALSE,
                distfun = pearson.dist, labCol = paste(samples$Nutrition,samples$AZD,sep="-")[sel],
                hclustfun = function(X){hclust(X,method="ward.D2")},margins = c(6,5))

9 Comparisons of GOI lists (Venn diagrams)

9.1 GOI at T6

9.1.1 Comparison of AZD treatment with starvations

  • All GOI
grid.draw(venn.diagram(list(AzdEffect6hrs, PiEffect6hrs, SucEffect6hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Phos. Starv.","Suc. Starv.")))

  • Downregulated genes
grid.draw(venn.diagram(list(AzdLow6hrs, PiLow6hrs, SucLow6hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Phos. Starv.","Suc. Starv.")))

  • Upregulated genes
grid.draw(venn.diagram(list(AzdHigh6hrs, PiHigh6hrs, SucHigh6hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Phos. Starv.","Suc. Starv.")))

9.1.2 Interaction between AZD treatment and starvations

  • Induced genes for sucrose starvation
grid.draw(venn.diagram(list(AzdHigh6hrs, AzdNPHigh6hrs, SucHigh6hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Suc. Starv. + AZD","Suc. Starv.")))

  • Repressed genes for sucrose starvation
grid.draw(venn.diagram(list(AzdLow6hrs, AzdNPLow6hrs, SucLow6hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Suc. Starv. + AZD","Suc. Starv.")))

  • Induced genes for phosphorus starvation
grid.draw(venn.diagram(list(AzdHigh6hrs, AzdNSHigh6hrs, PiHigh6hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Pi Starv. + AZD","Pi Starv.")))

  • Repressed genes for phosphorus starvation
grid.draw(venn.diagram(list(AzdLow6hrs, AzdNSLow6hrs, PiLow6hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Pi Starv. + AZD","Pi Starv.")))

9.2 GOI at T24

#’ ### Comparison of AZD treatment with starvations * All GOI

grid.draw(venn.diagram(list(AzdEffect24hrs, PiEffect24hrs, SucEffect24hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Phos. Starv.","Suc. Starv.")))

  • Downregulated genes
grid.draw(venn.diagram(list(AzdLow24hrs, PiLow24hrs, SucLow24hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Phos. Starv.","Suc. Starv.")))

  • Upregulated genes
grid.draw(venn.diagram(list(AzdHigh24hrs, PiHigh24hrs, SucHigh24hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Phos. Starv.","Suc. Starv.")))

9.2.1 Interaction between AZD treatment and starvations

  • Induced genes for sucrose starvation
grid.draw(venn.diagram(list(AzdHigh24hrs, AzdNPHigh24hrs, SucHigh24hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Suc. Starv. + AZD","Suc. Starv.")))

  • Repressed genes for sucrose starvation
grid.draw(venn.diagram(list(AzdLow24hrs, AzdNPLow24hrs, SucLow24hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Suc. Starv. + AZD","Suc. Starv.")))

  • Induced genes for phosphorus starvation
grid.draw(venn.diagram(list(AzdHigh24hrs, AzdNSHigh24hrs, PiHigh24hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Pi Starv. + AZD","Pi Starv.")))

  • Repressed genes for phosphorus starvation
grid.draw(venn.diagram(list(AzdLow24hrs, AzdNSLow24hrs, PiLow24hrs),
                       filename=NULL,
                       col=pal[1:3],
                       category.names=c("AZD","Pi Starv. + AZD","Pi Starv.")))

9.3 Between timepoints

9.3.1 In response to AZD treatment

  • Upregulated
grid.draw(venn.diagram(list(AzdHigh6hrs, AzdHigh24hrs),
                       filename=NULL,
                       col=pal[1:2],
                       category.names=c("6hrs","24hrs")))

  • Downregulated
grid.draw(venn.diagram(list(AzdLow6hrs, AzdLow24hrs),
                       filename=NULL,
                       col=pal[1:2],
                       category.names=c("6hrs","24hrs")))

9.3.2 In response to Phosphate starvation

  • Upregulated
grid.draw(venn.diagram(list(PiHigh6hrs, PiHigh24hrs),
                       filename=NULL,
                       col=pal[1:2],
                       category.names=c("6hrs","24hrs")))

  • Downregulated
grid.draw(venn.diagram(list(PiLow6hrs, PiLow24hrs),
                       filename=NULL,
                       col=pal[1:2],
                       category.names=c("6hrs","24hrs")))

9.3.3 In response to Sucrose starvation

  • Upregulated
grid.draw(venn.diagram(list(SucHigh6hrs, SucHigh24hrs),
                       filename=NULL,
                       col=pal[1:2],
                       category.names=c("6hrs","24hrs")))

  • Downregulated
grid.draw(venn.diagram(list(SucLow6hrs, SucLow24hrs),
                       filename=NULL,
                       col=pal[1:2],
                       category.names=c("6hrs","24hrs")))

10 Export list of DEGs

write.table(AzdHigh24hrs, file = "AzdHigh24hrs.csv", sep=";", row.names = FALSE)
write.table(AzdHigh6hrs, file = "AzdHigh6hrs.csv", sep=";", row.names = FALSE)
write.table(PiHigh24hrs, file = "PiHigh24hrs.csv", sep=";", row.names = FALSE)
write.table(PiHigh6hrs, file = "PiHigh6hrs.csv", sep=";", row.names = FALSE)
write.table(SucHigh24hrs, file = "SucHigh24hrs.csv", sep=";", row.names = FALSE)
write.table(SucHigh6hrs, file = "SucHigh6hrs.csv", sep=";", row.names = FALSE)

write.table(AzdLow24hrs, file = "AzdLow24hrs.csv", sep=";", row.names = FALSE)
write.table(AzdLow6hrs, file = "AzdLow6hrs.csv", sep=";", row.names = FALSE)
write.table(PiLow24hrs, file = "PiLow24hrs.csv", sep=";", row.names = FALSE)
write.table(PiLow6hrs, file = "PiLow6hrs.csv", sep=";", row.names = FALSE)
write.table(SucLow24hrs, file = "SucLow24hrs.csv", sep=";", row.names = FALSE)
write.table(SucLow6hrs, file = "SucLow6hrs.csv", sep=";", row.names = FALSE)

write.table(AzdNPLow6hrs, file = "AzdNPLow6hrs.csv", sep=";", row.names = FALSE)
write.table(AzdNPHigh6hrs, file = "AzdNPHigh6hrs.csv", sep=";", row.names = FALSE)
write.table(AzdNPLow24hrs, file = "AzdNPLow24hrs.csv", sep=";", row.names = FALSE)
write.table(AzdNPHigh24hrs, file = "AzdNPHigh24hrs.csv", sep=";", row.names = FALSE)

write.table(AzdNSLow6hrs, file = "AzdNSLow6hrs.csv", sep=";", row.names = FALSE)
write.table(AzdNSHigh6hrs, file = "AzdNSHigh6hrs.csv", sep=";", row.names = FALSE)
write.table(AzdNSLow24hrs, file = "AzdNSLow24hrs.csv", sep=";", row.names = FALSE)
write.table(AzdNSHigh24hrs, file = "AzdNSHigh24hrs.csv", sep=";", row.names = FALSE)

11 GO enrichment analysis

11.1 For AZD treatment

  • Induced genes after 6hrs
GO <- gopher(AzdHigh6hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## Loading required package: jsonlite
## 
## Attaching package: 'jsonlite'
## The following object is masked from 'package:purrr':
## 
##     flatten
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdHigh6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdHigh6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdHigh6hrs.csv", sep = ";", row.names = FALSE)
  • Induced genes after 24hrs
GO <- gopher(AzdHigh24hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana",alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdHigh24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdHigh24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdHigh24hrs.csv", sep = ";", row.names = FALSE)
  • Repressed genes after 6hrs
GO <- gopher(AzdLow6hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana",alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdLow6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdLow6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdLow6hrs.csv", sep = ";", row.names = FALSE)
  • Repressed genes after 24hrs
GO <- gopher(AzdLow24hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana",alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdLow24hrs.csv", sep = ";", row.names = FALSE)

11.2 For Sucrose starvation

  • Induced genes after 6hrs
GO <- gopher(SucHigh6hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_SucHigh6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_SucHigh6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_SucHigh6hrs.csv", sep = ";", row.names = FALSE)
  • Induced genes after 24hrs
GO <- gopher(SucHigh24hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_SucHigh24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_SucHigh24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_SucHigh24hrs.csv", sep = ";", row.names = FALSE)
  • Repressed genes after 6hrs
GO <- gopher(SucLow6hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_SucLow6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_SucLow6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_SucLow6hrs.csv", sep = ";", row.names = FALSE)
  • Repressed genes after 24hrs
GO <- gopher(SucLow24hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_SucLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_SucLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_SucLow24hrs.csv", sep = ";", row.names = FALSE)

11.3 For Phosphorus starvation

  • Induced genes after 6hrs
GO <- gopher(PiHigh6hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_PiHigh6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_PiHigh6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_PiHigh6hrs.csv", sep = ";", row.names = FALSE)
  • Induced genes after 24hrs
GO <- gopher(PiHigh24hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_PiHigh24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_PiHigh24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_PiHigh24hrs.csv", sep = ";", row.names = FALSE)
  • Repressed genes after 6hrs
GO <- gopher(PiLow6hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_PiLow6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_PiLow6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_PiLow6hrs.csv", sep = ";", row.names = FALSE)
  • Repressed genes after 24hrs
GO <- gopher(PiLow24hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_PiLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_PiLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_PiLow24hrs.csv", sep = ";", row.names = FALSE)

11.4 For the interaction between AZD treatment and phosphorus starvation

  • Induced genes after 6hrs
GO <- gopher(AzdNSHigh6hrs,background=rownames(vsd),url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdNSHigh6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdNSHigh6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdNSHigh6hrs.csv", sep = ";", row.names = FALSE)
  • Induced genes after 24hrs
GO <- gopher(AzdNSHigh24hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdNSHigh24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdNSHigh24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdNSHigh24hrs.csv", sep = ";", row.names = FALSE)
  • Repressed genes after 6hrs
GO <- gopher(AzdNSLow6hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdNSLow6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdNSLow6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdNSLow6hrs.csv", sep = ";", row.names = FALSE)
  • Repressed genes after 24hrs
GO <- gopher(AzdNSLow24hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdNSLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdNSLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdNSLow24hrs.csv", sep = ";", row.names = FALSE)

11.5 For the interaction between AZD treatment and sugar starvation

  • Induced genes after 6hrs
GO <- gopher(AzdNPHigh6hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdNPHigh6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdNPHigh6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdNPHigh6hrs.csv", sep = ";", row.names = FALSE)
  • Induced genes after 24hrs
GO <- gopher(AzdNPHigh24hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdNPHigh24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdNPHigh24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdNPHigh24hrs.csv", sep = ";", row.names = FALSE)
  • Repressed genes after 6hrs
GO <- gopher(AzdNPLow6hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdNPLow6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdNPLow6hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdNPLow6hrs.csv", sep = ";", row.names = FALSE)
  • Repressed genes after 24hrs
GO <- gopher(AzdNPLow24hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdNPLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdNPLow24hrs.csv", sep = ";", row.names = FALSE) 
write.table(GO$pfam, file = "PFAM_AzdNPLow24hrs.csv", sep = ";", row.names = FALSE)

12 Differential expression of +/-AZD in -Pi samples at 24hrs

12.1 Filtration of samples based on timepoint

samples %<>% mutate(Conditions,Conditions=relevel(Conditions,"T24_NS_DMSO"))
sel <- samples$Timepoint %in% c("T24")
suppressMessages(dds <- DESeqDataSetFromMatrix(
    countData = kg[,sel],
    colData = samples[sel,],
    design = ~ Conditions))

12.2 Differential expression analysis

dds <- DESeq(dds)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing

12.3 Variance Stabilising Transformation

12.3.1 Perform a Variance Stabilizing Transformation for plotting

vst <- varianceStabilizingTransformation(dds,blind=FALSE)
vsd <- assay(vst)
vsd <- vsd - min(vsd)

12.4 Contrasts to NPS_DMSO

The contrast by default is the first one (not Intercept)

resultsNames(dds)
## [1] "Intercept"                             
## [2] "Conditions_T24_NPS_DMSO_vs_T24_NS_DMSO"
## [3] "Conditions_T24_NPS_AZD_vs_T24_NS_DMSO" 
## [4] "Conditions_T24_NS_AZD_vs_T24_NS_DMSO"  
## [5] "Conditions_T24_NP_DMSO_vs_T24_NS_DMSO" 
## [6] "Conditions_T24_NP_AZD_vs_T24_NS_DMSO"

12.4.1 Nutrition effect of carbon starvation

12.4.1.1 Extraction of the results from the DESeq analysis

res <- results(dds,name = "Conditions_T24_NS_AZD_vs_T24_NS_DMSO")
data <- data.frame(rownames(res), res$log2FoldChange, res$padj)
write.table(data, file = "Conditions_T24_NS_AZD_vs_T24_NS_DMSO.csv", sep = ";", row.names = FALSE, dec=",")
cutoffs <- abs(res$log2FoldChange) >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff1 <- res$log2FoldChange >= lfc & ! is.na(res$padj) & res$padj <= FDR
cutoff2 <- res$log2FoldChange <= -lfc & ! is.na(res$padj) & res$padj <= FDR
AzdInPiEffect24hrs <- rownames(res[cutoffs,])
AzdInPiLow24hrs <- rownames(res[cutoff2,])
AzdInPiHigh24hrs <- rownames(res[cutoff1,])

message(sprintf("There are %s genes that are differentially expressed",sum(cutoffs)))
## There are 6514 genes that are differentially expressed
message(sprintf("There are %s genes that are induced",sum(cutoff1)))
## There are 3035 genes that are induced
message(sprintf("There are %s genes that are repressed",sum(cutoff2)))
## There are 3479 genes that are repressed
write.table(AzdInPiLow24hrs, file = "AzdInPiLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(AzdInPiHigh24hrs, file = "AzdInPiHigh24hrs.csv", sep = ";", row.names = FALSE)

12.4.1.2 MA plot

DESeq2::plotMA(res)

12.4.1.3 Volcano plot

volcanoPlot(res, lfc = 0.5)

12.4.1.4 Heatmap

hm <- heatmap.2(t(scale(t(vsd[cutoffs,]))),col=hpal,
                Colv=FALSE,dendrogram = "row",trace = "none",labRow = FALSE,
                distfun = pearson.dist, labCol = paste(samples$Nutrition,samples$AZD,sep="-")[sel],
                hclustfun = function(X){hclust(X,method="ward.D2")},margins = c(6,5))

12.5 GOpher analysis

  • Induced genes
GO <- gopher(AzdInPiHigh24hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdInPiHigh24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdInPiHigh24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdInPiHigh24hrs.csv", sep = ";", row.names = FALSE)
#View(GO$go)
#View(GO$kegg)
  • Repressed genes
GO <- gopher(AzdInPiLow24hrs,background=rownames(vsd)[rowSums(vsd)>0],url="athaliana", alpha=2)
## No enrichments found in task: mapman
write.table(GO$go, file = "GO_AzdInPiLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$kegg, file = "KEGG_AzdInPiLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdInPiLow24hrs.csv", sep = ";", row.names = FALSE)
write.table(GO$pfam, file = "PFAM_AzdInPiHigh24hrs.csv", sep = ";", row.names = FALSE)
#View(GO$go)
#View(GO$kegg)

13 Expression level analysis of specific gene lists

levels(samples$Conditions)
##  [1] "T24_NS_DMSO"  "T24_NPS_DMSO" "T6_NPS_DMSO"  "T0_T0_0"      "T6_NPS_AZD"  
##  [6] "T6_NS_DMSO"   "T6_NS_AZD"    "T6_NP_DMSO"   "T6_NP_AZD"    "T24_NPS_AZD" 
## [11] "T24_NS_AZD"   "T24_NP_DMSO"  "T24_NP_AZD"
sel_T0 <- samples$Timepoint %in% c("T0","T6","T24")

suppressMessages(dds_T0 <- DESeqDataSetFromMatrix(
    countData = kg[,sel_T0],
    colData = samples[sel_T0,],
    design = ~ Conditions))

13.1 Differential expression analysis

dds_T0 <- DESeq(dds_T0)
## estimating size factors
## estimating dispersions
## gene-wise dispersion estimates
## mean-dispersion relationship
## final dispersion estimates
## fitting model and testing
## -- replacing outliers and refitting for 2 genes
## -- DESeq argument 'minReplicatesForReplace' = 7 
## -- original counts are preserved in counts(dds)
## estimating dispersions
## fitting model and testing

13.2 Variance Stabilising Transformation

13.2.1 Perform a Variance Stabilizing Transformation for plotting

vst_T0 <- varianceStabilizingTransformation(dds_T0,blind=FALSE)
vsd_T0 <- assay(vst_T0)
vsd_T0 <- vsd_T0 - min(vsd_T0)

13.3 Export the complete list of averages

sel1 <- rownames(vsd_T0)
expr <- vsd_T0[match(sel1,rownames(vsd_T0)),]
Avg <- sapply(split.data.frame(t(expr),f = droplevels(samples$Conditions[sel_T0])),colMeans)
write.table(Avg, file = "Averaged_Normalized_Counts.csv", sep = ";", row.names = FALSE, dec=",")

13.4 TOR complex members

13.4.1 Preparation of the complex member list

sel1 <- c("AT1G50030","AT3G18140","AT2G22040","AT3G08850","AT5G01770") 

13.4.2 Preparation of the expression table for the shortlisted genes

expr <- vsd_T0[match(sel1,rownames(vsd_T0)),]
#expr <- vsd_T0[match(rownames(vsd_T0),sel1),]
#expr <- na.omit(expr)
AvgTOR <- sapply(split.data.frame(t(expr),f = droplevels(samples$Conditions[sel_T0])),colMeans)
SDTOR <- sapply(split.data.frame(t(expr),f = droplevels(samples$Conditions[sel_T0])),colSds)

13.4.3 Graphical representations

13.4.3.1 Combined barplots

barplot(AvgTOR,beside=T, cex.names=0.7,legend.text = sel1,ylim=c(0,4))
barcenters <- barplot(AvgTOR,beside=T, cex.names=0.7,legend.text = sel1,ylim=c(0,4))
arrows(x0=barcenters, x1=barcenters, y0=AvgTOR-SDTOR, y1=AvgTOR+SDTOR,
       lwd=1.5, angle=90, length=0.05,code=3)
## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

13.4.3.2 Separated barplots

for (i in 1:length(AvgTOR[,1])){
    barcenters <- barplot(AvgTOR[i,],beside=T, cex.names=0.7,legend.text = sel1[i],ylim=c(0,4))
    arrows(x0=barcenters, x1=barcenters, y0=AvgTOR[i,]-SDTOR[i,], y1=AvgTOR[i,]+SDTOR[i,],
           lwd=1.5, angle=90, length=0.2,code=3)
}

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR[i, ] -
## SDTOR[i, : zero-length arrow is of indeterminate angle and so skipped

13.4.3.3 Individual graphs

for (i in 1:length(AvgTOR[,1]))
{
    plot(AvgTOR[i,],ylim=c(min(AvgTOR[i,]-SDTOR[i,]),max(AvgTOR[i,]+SDTOR[i,])),
         xaxt="n",xlab="",ylab=sprintf("gene = %s",rownames(AvgTOR)[i]))
    axis(side = 1,at=1:13, colnames(AvgTOR),cex.axis=0.7,las=2)
    arrows(x0=1:length(AvgTOR[i,]), x1=1:length(AvgTOR[i,]),
           y0=AvgTOR[i,]-SDTOR[i,], y1=AvgTOR[i,]+SDTOR[i,],
           lwd=1.5, angle=90, length=0.05,code=3)
}

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

13.4.3.4 Heatmap

AvgTOR[AvgTOR == 0] <- 0.000001
AvgTOR_norm <- log2(AvgTOR[,] / AvgTOR[,1])
AvgTOR_norm[AvgTOR_norm < -0.5] <- -0.5; AvgTOR_norm[AvgTOR_norm > 0.5] <- 0.5


heatmap.2(AvgTOR_norm,
          col=hpal,
          dendrogram="none",
          trace="none",
          Colv=FALSE,
          Rowv=FALSE,
          margins=c(8,8))

13.5 Genes involved in the cell cycle

13.5.1 Preparation of a list of genes of the cell cycle

sel1 <- read.csv("~/arabidopsis-nutrition-TOR/seidr/cell_cycle_genes.csv", sep=";")[,1]

13.6 Preparation of the expression table for the shortlisted genes

expr <- vsd_T0[match(sel1,rownames(vsd_T0)),]
#expr <- vsd_T0[match(rownames(vsd_T0),sel1),]
#expr <- na.omit(expr)
AvgTOR <- sapply(split.data.frame(t(expr),f = droplevels(samples$Conditions[sel_T0])),colMeans)
SDTOR <- sapply(split.data.frame(t(expr),f = droplevels(samples$Conditions[sel_T0])),colSds)

13.7 Graphical representations

13.7.1 Combined barplots

barplot(AvgTOR,beside=T, cex.names=0.7,legend.text = sel1,ylim=c(0,4))
barcenters <- barplot(AvgTOR,beside=T, cex.names=0.7,legend.text = sel1,ylim=c(0,4))
arrows(x0=barcenters, x1=barcenters, y0=AvgTOR-SDTOR, y1=AvgTOR+SDTOR,
       lwd=1.5, angle=90, length=0.05,code=3)
## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = barcenters, x1 = barcenters, y0 = AvgTOR - SDTOR, : zero-
## length arrow is of indeterminate angle and so skipped

13.7.2 Individual graphs without colors

for (i in 1:length(AvgTOR[,1]))
{
    plot(AvgTOR[i,],ylim=c(min(AvgTOR[i,]-SDTOR[i,]),max(AvgTOR[i,]+SDTOR[i,])),
         xaxt="n",xlab="",ylab=sprintf("gene = %s",rownames(AvgTOR)[i]))
    axis(side = 1,at=1:13, colnames(AvgTOR),cex.axis=0.7,las=2)
    arrows(x0=1:length(AvgTOR[i,]), x1=1:length(AvgTOR[i,]),
           y0=AvgTOR[i,]-SDTOR[i,], y1=AvgTOR[i,]+SDTOR[i,],
           lwd=1.5, angle=90, length=0.05,code=3)
}

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = 1:length(AvgTOR[i, ]), x1 = 1:length(AvgTOR[i, ]), :
## zero-length arrow is of indeterminate angle and so skipped

13.7.3 Individual graphs with colors

a <- matrix(NA, nrow=6, ncol=3)
colnames(a) <- c(0,6,24)
rownames(a) <- c("NPS_DMSO","NPS_AZD","NS_DMSO","NS_AZD","NP_DMSO","NP_AZD")
b <- matrix(NA, nrow=6, ncol=3)
colnames(b) <- c(0,6,24)
rownames(b) <- c("NPS_DMSO","NPS_AZD","NS_DMSO","NS_AZD","NP_DMSO","NP_AZD")


for (i in 1:length(AvgTOR[,1]))
    {
    a[1:6,1] <- AvgTOR[i,1]
    a[1:6,2] <- AvgTOR[i,2:7]
    a[1:6,3] <- AvgTOR[i,8:13]
    
    b[1:6,1] <- SDTOR[i,1]
    b[1:6,2] <- SDTOR[i,2:7]
    b[1:6,3] <- SDTOR[i,8:13]
    
    plot(colnames(a),a[1,], type="l",ylim=c(min(a)-max(b),max(a)+max(b)),ylab=rownames(AvgTOR)[i])
    lines(colnames(a),a[2,], type="l",ylim=c(min(a)-max(b),max(a)+max(b)),lty=2)
    lines(colnames(a),a[3,], type="l",ylim=c(min(a)-max(b),max(a)+max(b)),col="turquoise")
    lines(colnames(a),a[4,], type="l",ylim=c(min(a)-max(b),max(a)+max(b)),col="turquoise",lty=2)
    lines(colnames(a),a[5,], type="l",ylim=c(min(a)-max(b),max(a)+max(b)),col="hotpink3")
    lines(colnames(a),a[6,], type="l",ylim=c(min(a)-max(b),max(a)+max(b)),col="hotpink3",lty=2)
    
    arrows(x0=c(0,6,24),
           x1=c(0,6,24),
           y0=a[1,] - b[1,],
           y1=a[1,] + b[1,],
           lwd=1, angle=90, length=0.05, code=3)
    arrows(x0=c(0,6,24),
           x1=c(0,6,24),
           y0=a[2,] - b[2,],
           y1=a[2,] + b[2,],
           lwd=1, angle=90, length=0.05, code=3)
    arrows(x0=c(0,6,24),
           x1=c(0,6,24),
           y0=a[3,] - b[3,],
           y1=a[3,] + b[3,],
           lwd=1, angle=90, length=0.05, code=3, col="turquoise")
    arrows(x0=c(0,6,24),
           x1=c(0,6,24),
           y0=a[4,] - b[4,],
           y1=a[4,] + b[4,],
           lwd=1, angle=90, length=0.05, code=3, col="turquoise")
    arrows(x0=c(0,6,24),
           x1=c(0,6,24),
           y0=a[5,] - b[5,],
           y1=a[5,] + b[5,],
           lwd=1, angle=90, length=0.05, code=3, col="hotpink3")
    arrows(x0=c(0,6,24),
           x1=c(0,6,24),
           y0=a[6,] - b[6,],
           y1=a[6,] + b[6,],
           lwd=1, angle=90, length=0.05, code=3, col="hotpink3")
}

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[1, ] - b[1, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[2, ] - b[2, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[3, ] - b[3, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[4, ] - b[4, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[5, ] - b[5, : zero-
## length arrow is of indeterminate angle and so skipped
## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

## Warning in arrows(x0 = c(0, 6, 24), x1 = c(0, 6, 24), y0 = a[6, ] - b[6, : zero-
## length arrow is of indeterminate angle and so skipped

13.7.4 Heatmap

AvgTOR[AvgTOR == 0] <- 0.000001
AvgTOR_norm <- log2(AvgTOR[,] / AvgTOR[,1])

AvgTOR_norm[AvgTOR_norm < -3] <- -3; AvgTOR_norm[AvgTOR_norm > 3] <- 3

heatmap.2(AvgTOR_norm,
          col=hpal,
          dendrogram="none",
          trace="none",
          Colv=FALSE,
          Rowv=FALSE,
          margins=c(8,8),
          labRow = read.csv("~/arabidopsis-nutrition-TOR/seidr/cell_cycle_genes.csv", sep=";")[,2])

heatmap.2(AvgTOR_norm,
          trace="none",
          col=hpal,
          Colv=FALSE,
          dendrogram = "row",
          labRow = read.csv("~/arabidopsis-nutrition-TOR/seidr/cell_cycle_genes.csv", sep=";")[,2],
          margins=c(8,8),
          hclustfun = function(X){hclust(X,method="ward.D2")})

13.8 Preparation of other lists

  • Preparation of the hexokinase list
sel1 <- c("AT1G05205","AT1G47840","AT1G47845","AT2G19860","AT4G29130")
  • Preparation of the AtHXK1
sel1 <- c("AT1G47845","AT4G29130")

14 Session Info

## R version 3.6.2 (2019-12-12)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.4 LTS
## 
## Matrix products: default
## BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
##  [1] grid      parallel  stats4    stats     graphics  grDevices utils    
##  [8] datasets  methods   base     
## 
## other attached packages:
##  [1] jsonlite_1.6.1              vsn_3.54.0                 
##  [3] VennDiagram_1.6.20          futile.logger_1.4.3        
##  [5] tximport_1.14.0             forcats_0.5.0              
##  [7] stringr_1.4.0               dplyr_0.8.4                
##  [9] purrr_0.3.3                 readr_1.3.1                
## [11] tidyr_1.0.2                 tibble_2.1.3               
## [13] tidyverse_1.3.0             scatterplot3d_0.3-41       
## [15] RColorBrewer_1.1-2          plotly_4.9.2               
## [17] pander_0.6.3                magrittr_1.5               
## [19] LSD_4.0-0                   limma_3.42.2               
## [21] hyperSpec_0.99-20200213     xml2_1.2.5                 
## [23] ggplot2_3.3.0               lattice_0.20-40            
## [25] here_0.1                    gplots_3.0.3               
## [27] DESeq2_1.26.0               SummarizedExperiment_1.16.1
## [29] DelayedArray_0.12.2         BiocParallel_1.20.1        
## [31] matrixStats_0.56.0          Biobase_2.46.0             
## [33] GenomicRanges_1.38.0        GenomeInfoDb_1.22.0        
## [35] IRanges_2.20.2              S4Vectors_0.24.3           
## [37] BiocGenerics_0.32.0         data.table_1.12.8          
## 
## loaded via a namespace (and not attached):
##  [1] readxl_1.3.1           backports_1.1.5        Hmisc_4.3-1           
##  [4] lazyeval_0.2.2         splines_3.6.2          digest_0.6.25         
##  [7] htmltools_0.4.0        gdata_2.18.0           fansi_0.4.1           
## [10] checkmate_2.0.0        memoise_1.1.0          cluster_2.1.0         
## [13] annotate_1.64.0        modelr_0.1.6           jpeg_0.1-8.1          
## [16] colorspace_1.4-1       blob_1.2.1             rvest_0.3.5           
## [19] haven_2.2.0            xfun_0.12              crayon_1.3.4          
## [22] RCurl_1.98-1.1         genefilter_1.68.0      survival_3.1-11       
## [25] glue_1.3.2             gtable_0.3.0           zlibbioc_1.32.0       
## [28] XVector_0.26.0         scales_1.1.0           futile.options_1.0.1  
## [31] DBI_1.1.0              Rcpp_1.0.4             viridisLite_0.3.0     
## [34] xtable_1.8-4           htmlTable_1.13.3       foreign_0.8-76        
## [37] bit_1.1-15.2           preprocessCore_1.48.0  Formula_1.2-3         
## [40] htmlwidgets_1.5.1      httr_1.4.1             acepack_1.4.1         
## [43] pkgconfig_2.0.3        XML_3.99-0.3           nnet_7.3-13           
## [46] dbplyr_1.4.2           locfit_1.5-9.4         tidyselect_1.0.0      
## [49] rlang_0.4.5            AnnotationDbi_1.48.0   munsell_0.5.0         
## [52] cellranger_1.1.0       tools_3.6.2            cli_2.0.2             
## [55] generics_0.0.2         RSQLite_2.2.0          broom_0.5.5           
## [58] evaluate_0.14          yaml_2.2.1             knitr_1.28            
## [61] bit64_0.9-7            fs_1.3.2               caTools_1.18.0        
## [64] nlme_3.1-144           formatR_1.7            compiler_3.6.2        
## [67] rstudioapi_0.11        curl_4.3               png_0.1-7             
## [70] testthat_2.3.2         affyio_1.56.0          reprex_0.3.0          
## [73] geneplotter_1.64.0     stringi_1.4.6          highr_0.8             
## [76] Matrix_1.2-18          vctrs_0.2.4            pillar_1.4.3          
## [79] lifecycle_0.2.0        BiocManager_1.30.10    bitops_1.0-6          
## [82] R6_2.4.1               latticeExtra_0.6-29    affy_1.64.0           
## [85] KernSmooth_2.23-16     gridExtra_2.3          lambda.r_1.2.4        
## [88] gtools_3.8.1           assertthat_0.2.1       rprojroot_1.3-2       
## [91] withr_2.1.2            GenomeInfoDbData_1.2.2 hms_0.5.3             
## [94] rpart_4.1-15           rmarkdown_2.1          lubridate_1.7.4       
## [97] base64enc_0.1-3